$__AUI_SELECT_SELECTOR: ".#{$aui-ns}-select";
$__AUI_SELECT_MENU_SELECTOR: ".#{$aui-ns}-select-menu";

$aui-form-select-state-selected: "aui-selected";

@mixin aui-form-mixin-select-menu() {
    position: absolute;
    .aui-dropdown-menu {
        position: relative;
        top: 100%;
        left: 0;
        max-height: 120px;
        overflow: auto;
        &[disabled] {
            overflow: hidden;
            background-color:#d9d9d9 !important;
            > li > a {
                background-color:#d9d9d9 !important;
                color:#aaa !important;
            }
        }
        > li > a {
            display: block;
            padding: 5px 10px;
            text-decoration: none;
            
        }
        &:not([disabled]) > li[aui-selected] > a {
            background-color: $aui-brand-info !important;
            color: #ffffff;          
            &:hover {
                background-color: $aui-brand-info !important;
                color: #ffffff;
            }
        }
        &[aui-active] {
            display: inline-block;
        }
    }
}

@mixin aui-form-use-select-menu-selector() {
    #{$__AUI_SELECT_MENU_SELECTOR} {
        @content;
    }
}

@mixin aui-form-use-select-selector() {
    #{$__AUI_SELECT_SELECTOR} {
        @content;
    }
}

@mixin aui-form-mixin-select() {
    .caret {
        margin-left: 3px;
    }
}

@mixin aui-form-create-select($selector: $__AUI_SELECT_SELECTOR) {
    #{$selector} {
        @include aui-form-mixin-select();
    }
}

@mixin aui-form-create-select-menu($selector: $__AUI_SELECT_MENU_SELECTOR) {
    #{$selector} {
        @include aui-form-mixin-select-menu();
    }
}